home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / arexx / ole1v10a.lha / OLE_System / modules / fw3 / DupObjects.fw < prev    next >
Encoding:
Text File  |  1995-02-10  |  1.3 KB  |  85 lines

  1. /*
  2.  * DupObjects.fw
  3.  *
  4.  * USAGE: DupObjects.fw
  5.  *
  6.  * DupObjects.fw let the Final Writer user to multiply one or more
  7.  * objects.
  8.  *
  9.  * HISTORY:
  10.  * v1.01    increments are converted in MICROPOINTS
  11.  *
  12.  * v1.02    aligned with the new server design v1.10
  13.  *
  14.  * $(C): (1994, Rocco Coluccelli, Bologna)
  15.  * $VER: DupObjects.fw 1.02 (30.Nov.1994)
  16.  */
  17.  
  18. OPTIONS RESULTS
  19.  
  20. PARSE ARG oleclip
  21. PARSE VALUE GETCLIP(oleclip) WITH jobID modID . . . . . oleport . . userport olepipe .
  22.  
  23. /*
  24.  *    olepipe = num.rows inc.rows num.cols inc.cols
  25.  */
  26. PARSE VALUE GETCLIP(olepipe) WITH num.rows inc.rows num.cols inc.cols .
  27.  
  28.  
  29. ADDRESS VALUE userport
  30.  
  31. SetMeasure "MICROPOINTS"
  32. View 50
  33.  
  34. obj. = 0
  35.  
  36.  
  37. /*
  38.  *    convert increments into MICROPOINTS
  39.  */
  40. ms.METRIC = 283.465; ms.INCHES = 720; ms.PICA = 120
  41.  
  42. GetDisplayPrefs 'measure'
  43. PARSE UPPER VAR result ms .
  44.  
  45. inc.rows = (inc.rows * ms.ms) % 1
  46. inc.cols = (inc.cols * ms.ms) % 1
  47.  
  48.  
  49. Group
  50. CurrentObject
  51. obj.0 = result
  52.  
  53. GetObjectCoords obj.0
  54. PARSE VAR result page base_x base_y base_w base_h .
  55. Cut
  56.  
  57. DO col = 0 TO num.cols
  58.  
  59.     x = base_x + col * inc.cols
  60.     DO row = 0 TO num.rows
  61.  
  62.         Paste
  63.         CurrentObject
  64.         obj.row.col = result
  65.  
  66.         y = base_y + row * inc.rows
  67.         SetObjectCoords obj.row.col page x y base_w base_h
  68.     END
  69. END
  70.  
  71. DO col = 0 TO num.cols
  72.     DO row = 0 TO num.rows
  73.         SelectObject obj.row.col 'MULTIPLE'
  74.     END
  75. END
  76. Ungroup
  77.  
  78.  
  79. Redraw
  80.  
  81. ADDRESS VALUE oleport
  82. SETJOB jobID 'end'
  83.  
  84. EXIT 0
  85.